Graphical models may be used to simulate types of physical systems, such as discrete systems, event-based systems, time-based systems, state-based systems, data flow-based systems, etc. These models may include components, such as blocks, that reference executable code for performing operations when the graphical model is executing. The blocks can vary in type and/or number and may be connected together to build large, complex models (e.g., models including hundreds or more interconnected blocks).
At times, it may be desirable to implement code from some or all of a graphical model on a target platform once a model has been designed. For example, a user may develop a graphical model on a workstation. When the model is complete, the user may wish to execute the model on a target device that includes a real-time operating system. In this example, the model may need to execute within a determined time interval on the target so that the target can perform processing operations in real-time (e.g., processing data from a running system without falling behind over time).
The user may need to perform trial and error guesses regarding how to schedule various components of the model for real-time execution on the target. For example, the target may utilize two processors to perform real-time processing. The user may need to allocate a portion of the model components to execute on one processor and another portion of the components to execute on the other processor. If the target cannot operate in real-time with this configuration, the user may need to reallocate the components in a different way and then determine whether the new configuration will execute in real-time on the target.
In some instances the user may spend significant time attempting different configurations in order to arrive at a schedule configuration amenable to real-time execution on the target. In some instances, such as when a model contains many components, the user may be unable to identify a schedule configuration for the model components that allows for real-time execution on the target. This last situation may frequently occur when, for example, some model components rely on other model components for data, or where model components have differing operating priorities in the model.